package ui.activity;

import android.os.Bundle;
import android.webkit.WebView;

import com.fy.fyzf.R;
import com.fy.fyzf.base.BaseActivity;
import com.fy.fyzf.base.BasePresenter;

import butterknife.BindView;
import butterknife.ButterKnife;

public class WebviewActivity extends BaseActivity {


    @BindView(R.id.webview)
    WebView webview;
    private String url;

    @Override
    protected BasePresenter createPresenter() {
        return null;
    }

    @Override
    public void initView() {
        super.initView();
        url = getIntent().getStringExtra("url");

        webview.getSettings().setSupportZoom(true);
        webview.getSettings().setAppCacheEnabled(true);
        webview.getSettings().setDomStorageEnabled(true);
        webview.getSettings().setUseWideViewPort(true);
        webview.getSettings().setLoadWithOverviewMode(true);
        webview.getSettings().setJavaScriptEnabled(true);
    }

    @Override
    public void initData() {
        super.initData();
        webview.loadUrl(url);
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_webview;
    }

}